Skip to content

Add share-log subcomamnd to upload install.log to paste.rs#4511

Open
Softer wants to merge 3 commits intoarchlinux:masterfrom
Softer:feat-share-log
Open

Add share-log subcomamnd to upload install.log to paste.rs#4511
Softer wants to merge 3 commits intoarchlinux:masterfrom
Softer:feat-share-log

Conversation

@Softer
Copy link
Copy Markdown
Contributor

@Softer Softer commented May 1, 2026

Replaces the broken curl ... https://0x0.st hint with an integrated archinstall share-log command that uploads /var/log/archinstall/install.log to paste.rs and prints a shareable URL. Also updates the same hint in the README, the bug report docs, and the GitHub bug issue template, so all four user-facing references now point to the working command.

Refs #4396 (0x0.st has disabled uploads). Supersedes #4507, which removes the hint without offering a replacement.

Why paste.rs

  • Text-oriented pastebin with extension-based syntax highlighting, so install.log renders as a readable page rather than a raw download
  • 10 MiB upload limit (well above realistic install.log sizes)
  • Curl-friendly, no account, no server-side state to maintain

The endpoint is referenced exactly once - a constant in archinstall/lib/output.py. If a self-hosted paste service is set up later, or 0x0.st returns, swapping it is a one-line change.

Behavior

$ archinstall share-log
About to upload /var/log/archinstall/install.log (12345 bytes) to https://paste.rs
The log may contain hostname, mirror URLs, package list and partition layout.
The uploaded paste is public.
Continue?
https://paste.rs/abc.def

  • Runs as a subcommand (archinstall share-log), not a flag - it is a standalone command, not an installer option
  • Runs before root check so non-root users can share logs too
  • TUI confirmation via ConfirmationScreen (consistent with the rest of archinstall)
  • Diagnostics go through info(); only the final URL goes to raw print() so it can be piped (archinstall share-log | xclip -sel clip)
  • Logs exceeding 10 MiB are truncated from the bottom up (latest entries kept) instead of refusing to upload
  • File-not-found, empty file, network failure and unexpected response are each handled with a clear message and non-zero exit

Test plan

  • archinstall share-log on a live ISO - URL is printed and the paste is readable
  • archinstall share-log answering No - exits cleanly without uploading
  • archinstall share-log with install.log missing - reports the error and exits non-zero
  • archinstall share-log with no network - reports the error and exits non-zero
  • Trigger an install error and confirm the hint says archinstall share-log

@Torxed
Copy link
Copy Markdown
Member

Torxed commented May 1, 2026

Just note that I started a conversation about an arch official channel for posting these logs. I created a ticket to track the progress on gitlab@archlinux #833

@Softer
Copy link
Copy Markdown
Contributor Author

Softer commented May 1, 2026

We can change --share-log behavior transparently for users any time we need without changing user's expectation. :)

Comment thread archinstall/lib/args.py Outdated
Comment thread archinstall/lib/share_log.py Outdated
Comment thread archinstall/lib/share_log.py Outdated
Comment thread archinstall/lib/share_log.py Outdated
Comment thread archinstall/lib/share_log.py Outdated
@Softer Softer changed the title Add --share-log flag to upload install.log to paste.rs Add share-log subcomamnd to upload install.log to paste.rs May 3, 2026
@Softer
Copy link
Copy Markdown
Contributor Author

Softer commented May 3, 2026

Changes per review:

  • archinstall share-log subcommand instead of --share-log flag
  • Code moved into output.py, share_log.py deleted
  • Large logs truncated from bottom up instead of refusing upload
  • TUI ConfirmationScreen instead of input()
  • info() for diagnostics; final URL stays as print() for pipe-friendliness

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants